import Vue from 'vue';
import App from './App.vue';
import VueRouter from './router';
import HelloWorld from './components/HelloWorld.vue';
import hello from './components/hello.vue';

Vue.config.productionTip = false;

// new Vue({
//   render: h => h(App),
// }).$mount('#app')

Vue.use(VueRouter);
// 创建路由对象
const router = new VueRouter({
    routes: [
      {
        name: 'home',
        path: '/',
        component: HelloWorld
      }, {
        name: 'Hello',
        path: '/hello',
        component: hello
      }]
  })
;
// 创建 Vue实例
new Vue({
  router,
  render: h => h(App)
}).$mount('#app');
